#include <gui/sportpage_screen/SportPageView.hpp>
#include <gui/sportpage_screen/SportPagePresenter.hpp>

SportPagePresenter::SportPagePresenter(SportPageView& v)
    : view(v)
{

}

void SportPagePresenter::activate()
{
	SportPagePresenterState(true);
}

void SportPagePresenter::deactivate()
{
	SportPagePresenterState(false);
}
//SportPagePresenter
void SportPagePresenter::SportPagePresenterState(bool enable)
{
	if(enable == true)
		model->SportPageViewTask(true);
	else
		model->SportPageViewTask(false);
}
//退出运动模式界面
void SportPagePresenter::SportPageExit(uint8_t newFiveKeyFunc)
{
	  view.SportPageExit(newFiveKeyFunc);
}